﻿using OnlineLearningSystem.IRepository;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace OnlineLearningSystem.Controllers
{
    /// <summary>
    /// 自定义路由模版
    /// 用于解决swagger文档No operations defined in spec!问题
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    //[Authorize]
    public class BaseController : ControllerBase
    {
        protected readonly IUserRepository _userService;
        protected readonly ICourseRepository _courseService;
        protected readonly IBatchRepository _batchService;
        protected readonly ILearningSituationRepository _learningSituationService;
        protected readonly ITestRepository _testService;
        protected readonly ITopicRepository _topicService;
        public BaseController(IUserRepository userService, ICourseRepository courseService,
            IBatchRepository batchService, ILearningSituationRepository learningSituationService,
            ITestRepository testService, ITopicRepository topicService)
        {
            _userService = userService;
            _courseService = courseService;
            _batchService = batchService;
            _learningSituationService = learningSituationService;
            _testService = testService;
            _topicService = topicService;
        }

    }
}
